@echo off

rem NuGet.org deploy script

rem vars
set CURRENT_CONFIG=%1
set PROJECT_FILE="%2"

set PUSH_CONFIG=PushToNuGet

rem if configuration is not pushConfiguration, skipping the pack and push step

if not %CURRENT_CONFIG% == %PUSH_CONFIG% (
	echo %CURRENT_CONFIG% is not push configuration
	goto Exit
)

rem packing and pushing

echo Preparing to deploy
del *.nupkg

echo Packing project to NUPKG
nuget pack %PROJECT_FILE% -prop Configuration=%CURRENT_CONFIG%

echo Pushing to NuGet.org
move *.nupkg awx.nupkg
nuget push awx.nupkg

:Exit